Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pc/feat/nav bar update #881

Merged
merged 19 commits into from
Dec 4, 2023
Merged

Pc/feat/nav bar update #881

merged 19 commits into from
Dec 4, 2023

Conversation

PatrickCleary
Copy link
Member

@PatrickCleary PatrickCleary commented Oct 21, 2023

Motivation

Remove the tabs for sidebar navigation.
#848

Changes

Local data is broken for me for some reason, that's why all the graphs are erroring out.

Screen.Recording.2023-11-24.at.1.25.34.PM.mov

Testing Instructions

This change is pretty massive, so would appreciate thorough testing of all the pages, devices, different configurations, etc. It almost certainly has at least a couple bugs.

I will be doing some additional review at some point before I merge this.

@github-actions github-actions bot added the frontend Change to frontend code label Oct 21, 2023
@PatrickCleary PatrickCleary self-assigned this Nov 24, 2023
@PatrickCleary PatrickCleary marked this pull request as ready for review November 24, 2023 18:30
.prettierrc Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't get prettier to work until I changed this. Is this a bad idea? @devinmatte

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm did a new update break .js prettierrcs?

Copy link
Contributor

@idreyn idreyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really huge improvement, I think. I have a few stray design thoughts for now, I haven't looked at the code yet.

image
  1. With reference to the above image, I wonder whether we can drop the Bus and Subway headings. Red/Orange/Blue/Green/Bus as top-level items seem fine. Having a Bus heading with one subentry, Buses, is throwing me off a bit.

If we keep them, I think we should consider padding below the headings instead of to the left of the sub-items. For example:

image
  1. Some menu items like global Slow Zones don't have hover/active states yet. I also think those should retain some icons.

  2. Are icons for the per-line subpages (service etc) a no-go at this resolution? I kinda liked them but I can see how they'd be a bit busy here.

  3. The bus line dropdown (white text on yellow) is really hard for me to read. Could we use a more traditional black text on white here? It might also look better to expand the dropdown so that it entirely fills the yellow rectangle that contains it, with no padding or rounded corners.

image

@PatrickCleary
Copy link
Member Author

PatrickCleary commented Nov 27, 2023 via email

@PatrickCleary
Copy link
Member Author

@idreyn – Just updated with commit I had forgot to merge. Should have hover/active states for top two options (which should also still have icons).

Here is a pic of icons in the sidebar:
Screenshot 2023-11-27 at 9 59 50 PM

and without:
Screenshot 2023-11-27 at 9 51 27 PM

Bus color/style adjustment

Idk if this is what you were thinking. Let me know. Also, if you want to go in and try anything, please do.
Screenshot 2023-11-27 at 9 57 54 PM

@PatrickCleary
Copy link
Member Author

(most recent commit has no sidebar icons and updated bus style)

@idreyn
Copy link
Contributor

idreyn commented Dec 1, 2023

The bus dropdown is 👨‍🍳👌 and I still kinda like the icons in the sidebar tbh but that's just one opinion!

My vote is to land this basically as-is and then iterate if we want to change it. I'm setting a reminder to review the code tomorrow when I am feeling less zonked.

@devinmatte
Copy link
Member

So this looks great. Pushed it to beta to make it easier to test, and see it with real data

So I'll say that I'm also partial to the icons on the sections returning, but otherwise this is really clean 👌

I found a bug where I can still click the disabled green line slowzone section and open the broken page
Screenshot 2023-11-30 at 5 54 11 PM

modules/navigation/SideNavigation.tsx Outdated Show resolved Hide resolved
modules/navigation/ExtraMenuItems.tsx Outdated Show resolved Hide resolved
modules/navigation/ExtraMenuItems.tsx Outdated Show resolved Hide resolved
modules/navigation/SidebarTabs.tsx Outdated Show resolved Hide resolved
@PatrickCleary
Copy link
Member Author

PatrickCleary commented Dec 1, 2023 via email

@PatrickCleary
Copy link
Member Author

Okay I think everyone's comments have been addressed. Added back icons based on slack poll results.

@devinmatte @mathcolo @idreyn

@mathcolo
Copy link
Contributor

mathcolo commented Dec 1, 2023

Could we get the most recent changes on beta just to check it out before merge?

Copy link
Contributor

@idreyn idreyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest looks very classy.

I have one final nitpick (and really just one): in certain states, it looks like the elements could use some padding — between the selected Orange Line and the not-selected Red Line, and between the Red circle-icon and the left-edge of its rounded container.

image

But of course good to land as-is.

<Link
href={
line === 'line-bus'
? `/bus/trips/single?busRoute=1&date=${BUS_DEFAULTS.singleTripConfig.date}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have some helper fns to generate these URLs

@@ -11,23 +11,29 @@ import type { PageMetadata } from '../../common/constants/pages';

interface SidebarTabs {
tabs: PageMetadata[];
setSidebarOpen?: React.Dispatch<React.SetStateAction<boolean>>;
close?: (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never gets called with an argument so I think it could be just close: () => void. There are a few other components wrapping this one that have the same prop, and afaict that change could be made there too.

Copy link
Member

@devinmatte devinmatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I'll echo that perhaps we need a little additional margins between the lines, but, nothing major. Looks solid!

@PatrickCleary
Copy link
Member Author

PatrickCleary commented Dec 1, 2023 via email

@PatrickCleary PatrickCleary merged commit cd3d7cc into main Dec 4, 2023
5 checks passed
@PatrickCleary PatrickCleary deleted the pc/feat/nav-bar-update branch December 4, 2023 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Change to frontend code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants